a = int(input())
b = int(input())
c = int(input())
d = int(input())

if (a <= b <= 10) and (c <= d <= 10):
  ver = range(a, b+1)
  hor = range(c, d+1)
  for x in hor:
    print('\t', x, end='\t')
  print()
  for i in ver:
    print(i, end=' ')
    for j in hor:
      print('\t', i * j, ' ', end=' \t')
    print()

